@php
$url = route('app.post-list',['slug'=>'xwdt']);
$top = 'false';
$pre = url()->previous();
  if($pre==url('/app')){
          $top = 'true';
          $url=url('/app');
  }
@endphp
@extends('.app.layout')

        @section('title','新闻详情')
        @section('head')
            <link href="/code/css/main.css" rel="stylesheet" />
        @endsection
        @section('content')
            <header class="mui-bar mui-bar-nav">
        <span class="mui-pull-left return" onclick="aOfApp('{{$url}}',{{$top}})">
                    <img src="/code/images/back.png" />
                </span>
                <h1 class="mui-title">新闻详情</h1>
                <span  class="mui-pull-right shareBtn" onclick="share('{{route('app.post-index',['id'=>$post->id])}}','{{$post->post_title}}','{{asset('storage/'.$post->thumb)}}','{{$post->digest}}')">
                    <img src="/code/images/share.png" />
                </span>
            </header>
            <div class="mui-content">
                <div class="detail">
                    <div class="detail-title">{{$post->post_title}}</div>
                    <div class="detail-time">{{$post->created_at->format('m/d H:i')}}</div>
                    <!-- <div class="detail-img"><img src="{{asset('storage/'.$post->thumb)}}"></div> -->
                    <div class="detail-content">
                        {!! $post->content !!}
                    </div>
                </div>
            </div>
        @endsection